<?php
echo $form->create(array(
	'id'		=> 'frm',
	'action'	=> 'edit',
	'enctype'	=> 'multipart/form-data',
));
?>
	
 	<h4><?php echo __('Thông tin sản phẩm', true);?></h4>
	<table border="1" width="100%" cellpadding="0" cellspacing="0" id="product-table">
		<thead>
			<th width="80px" align="center"><?php echo __('Code', true); ?></th>
			<th><?php echo __('Product name', true); ?></th>
			<th><?php echo __('Quantiry', true); ?></th>
			<th><?php echo __('Price', true); ?></th>
			<th><?php echo __('Total', true); ?></th>
		</thead>

		<tbody>
			<?php foreach($abc['OrderDetail'] as $item) { ?>
			<tr>
				<td align="center">
					<?php echo $item['id']; ?>
				</td>

				<td>
					<?php echo $item['Product']['name_'.$lang]; ?>
				</td>

				<td align="center">
					<?php echo $item['quantity']; ?>
				</td>

				<td align="right">
					<span class="price">
						<?php echo money_format($item['cost'],2); ?>
					</span>
				<td align="right">
					<span class="price">
						<?php echo money_format($item['cost'] * $item['quantity'],2); ?>
					</span>
				</td>
			<tr>
			<?php } ?>
		</tbody>
	</table>
	<h4><?php echo __('Thông tin đặt hàng', true);?></h4>
	<div class="input">
		<label><?php echo __('Fullname', true); ?></label>
		<span><?php echo $abc['Order']['bill_name']; ?></span>
	</div>
	<div class="input">
		<label><?php echo __('Address', true); ?></label>
		<?php echo $abc['Order']['bill_address']; ?>
	</div>
	<div class="input">
		<label><?php echo __('Phone', true); ?></label>
		<?php echo $abc['Order']['bill_phone']; ?>
	</div>
	
	<h4><?php echo __('Thông tin giao hàng', true);?></h4>
	<div class="input">
		<label><?php echo __('Fullname', true); ?></label>
		<?php echo $abc['Order']['delivery_name']; ?>
	</div>
	<div class="input">
		<label><?php echo __('Address', true); ?></label>
		<?php echo $abc['Order']['delivery_address']; ?>
	</div>
	<div class="input">
		<label><?php echo __('Phone', true); ?></label>
		<?php echo $abc['Order']['delivery_phone']; ?>
	</div>
	<div class="input">
		<label><?php echo __('Chú thích', true); ?></label>
		<?php echo $abc['Order']['note']; ?>
	</div>
	
	<div class="input" style="margin-top:20px">
		<label><?php echo __('Tình trạng', true); ?></label>
		<?php echo ($abc['Order']['status'])? 'Đã xác nhận' : "Đang chờ"; ?>
	</div>

	<div class="input" align="center" >
      <?php echo $form->button('', array('class'=>'submit', 'type'=>'submit', 'id'=>'regSubmit')); ?>
     	<?php echo $form->button('', array('class'=>'reset', 'type'=>'reset')); ?>
    </div>
    <?php echo $form->hidden('Product.id'); ?>
<?php echo $form->end(); ?>
